<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@include file="../../common/header.jsp"%>
 <link type="text/css" rel="stylesheet" href="${ctx}/static/css/ui-lightness/jquery-ui-1.10.0.custom.min.css" media="all" />
<link type="text/css" rel="stylesheet" href="${ctx}/static/00100/stylesheets/smsAc.css" media="all" />
<script type="text/javascript">
    var ctx='${ctx}';
    var CTX='${ctx}';
    var cas_server_url = '${cas_server_url}';
</script>
<%@include file="../../common/microdone.jsp"%>
<script src="${ctx}/javascripts/caCert/jquery.datePicker-min.js"></script>
<script src="${ctx}/javascripts/caCert/jquery.cookie.js"></script>
<script type="text/javascript" src="${ctx }/javascripts/security/identify/GopayDtCert.js?3"></script>
<script type="text/javascript" src="${ctx}/static/00100/javascripts/gopay/smsAc/smsAc.js"></script>



<div class="container">
    <div class="grid-960">
        <!-- 支付订单详情 -->
        <jsp:include page="../../content/orderDtl.jsp" flush="true"/>
        <div class="payment-mode">
            <form id="confirmForm" name="confirmForm" method="post" action="${ctx}/sec/00100/pay/submit.shtml?orderKey=<%=request.getParameter("orderKey")%>&orderId=${orderId}">

            <div class="borderBox-3">
                <table class="table-tml-3">
                    <tbody>
                    <tr>
                        <th>付款方式：</th>
                        <td>
                            <div class="payment-box fix">
                                <div class="floatLeft">
                                    <span>国付宝帐户</span>
                                </div>
                                <div class="floatRight">
                                    支付<span class="color-c00">${acctPayAmt}</span>元
                                </div>
                            </div>
                            <c:if test="${payWay eq 'S'}">
                                <div class="payment-box fix">
                                    <div class="floatLeft">
                                        <img class="banks" src="${ctx}/BankIcon/${payBankCode}.jpeg"/>
                                        <c:if test="${(payChannel eq '01') or (payChannel eq '51') }">
                                            <span class="btn-5 zoom margin0 marginLeft10">网银支付</span>
                                        </c:if>
                                    </div>
                                    <div class="floatRight">
                                        支付<span class="color-c00">${bankPayAmt}</span>元
                                    </div>
                                </div>
                            </c:if>
                        </td>
                    </tr>
                    <tr>
                        <th>支付密码：</th>
                        <td class="posiRelative">
                            <div class="fix">
                                <span id="bankGopayPwdCtrlDiv" style="float: left;">
                                  <script>
                                      pgeditor.generate();
                                  </script>
                                </span>
                                <%--<span id="bankGopayPwdCtrlDivTip" style="display: none;float: left;">--%>
                                    <%--<span class="tips-3 zoom"><a href="#" onclick='javascript:window.location.href=cas_server_url+"/gopay/tools/GFB_SetupControl_1.0.2.0.exe"'>点击安装密码安全控件</a></span>--%>
                                <%--</span>--%>
                                <a  style="float:left;margin-top:8px;" href="${portal_url}/security/paypwd/find.shtml" class="font12 underline-none" target="_blank">&nbsp;&nbsp;找回支付密码</a>
                                <span class="tips-12 zoom" id="expressGopayPwdCtrlTip" style='display:<c:if test="${!((not empty temp.errMsg) and (temp.errId eq '1')) }">none</c:if> '>${temp.errMsg}</span>
                            </div>
                        </td>
                    </tr>
                    
                    <!-- 短信验证服务 -->
                      <c:if test="${(userType  ne '10') && (smsAcStat eq '01')}">
                    <tr>
                     <th>验证码：</th>
                    <td  class="posiRelative">
                    <input type="text"  id="smsAcVerifyCode" name="smsAcVerifyCode" style="width:252px;height:36px"><a href="javascript:void(0)" id="getmessageId" class="zoom marginLeft10 getmessage messageconfirm">获取短信验证码</a><a
                        href="javascript:void(0)" class="zoom marginLeft10 messageresend messageconfirm"></a>
                     <!--       <span id="smsacDivTip" style="display: none;float: left;"> -->
                     <span class="tips-12 zoom" id="smsacDivTip" style='display:<c:if test="${!((not empty temp.errMsg) and (temp.errId eq '2')) }">none</c:if> '>${temp.errMsg}</span>
                    </td>
                   </tr>
                   </c:if>
                		<!-- 加上动态口令卡 ，1表示有权限显示-->
					<c:if test="${true||(haveDcAuth eq '1')}">
					<tr id="dtLi" style="display: none;">
					<th>动态口令：</th>
				    <td >
					<input type="text" name="dcpass" id="dcpass" style="width:250px;height:32px"/>
				    </td>
			     </tr>
			     <tr>
			     <td colspan="2">
				<!-- 提示信息 -->
					<c:if test="${not empty temp.dcErrMesg}">
				 <div style="margin-left:180px;margin-right:200px;color: red">提示:${temp.dcErrMesg}</div>	
			     </c:if>
			     <td>
			     </tr>
			     </c:if>
                    </tbody>
                </table>
            </div>
            <table class="table-tml-3">
                <tbody>
                <tr>
                    <th></th>
                    <td>
                            <input type="hidden" name="payChannel" id="payChannel" value="${payChannel}"/>
                            <input type="hidden" name="orderId" id="orderId" value="${orderId}"/>
                            <input type="hidden" name="formhash" id="formhash" value="${formhash }"/>
                            <input type="hidden" name="payBankCode" id="payBankCode" value="${payBankCode }"/>
                            <input type="hidden" name="gopayUser" id="gopayUser" value="${sessionScope.gopayUser }"/>
                            <input type="hidden" name="pageFrom" value="order"/>
                            <input type="hidden" name="gopayAcctId" id="gopayAcctId" value="${gopayAcctId }"/>
                            <input type="hidden" name="payWay" id="payWay" value="${payWay}"/>
                            <input type="hidden" name="orderKey" id="orderKey" value="<%=request.getParameter("orderKey")%>"/>
                            <input type="hidden" id="sn" name="sign" value="" />
							<input type="hidden" id="snd" name="signedData" value="" />
						    <input type="hidden" id="freeFlag" name="freeFlag" value="${freeFlag}" />	
			                <input type="hidden" id="certType" name="certType" value="${certType}" />

                            <input type="hidden" name="password" id="password" />
                            <input type="hidden" name="network" id="local_network" value="" />
                            <input type="hidden" name="disk" id="local_disk" value="" />
                            <input type="hidden" name="cpu" id="local_cpu" value="" />
                            <input type="hidden" name="hardList" id="local_hardList" value="" />

                        <button class="btn-2 marginRight20" type="button" id="confirmSubmit"  >确认付款</button>
                        <a href="${ctx}/sec/pay/info.shtml?orderKey=<%=request.getParameter("orderKey")%>&orderId=${orderId}" class="font14 color-06c">选择其他付款方式</a>
                    </td>
                </tr>
                </tbody>
            <table>
            </form>
        </div>
    </div>
</div>
<%@include file="../../common/footer.jsp"%>
<!--网银支付合并付款-->
<script type="text/javascript">
//    var bankGopayPwdCtrl;//余额网银支付
//    alert("余额支付2");
    var txnAmt='${acctPayAmt}';

    //令牌和证书环境配置
    GopayDtCert.config({txnAmt:txnAmt});
    //令牌和证书绘制
    var w1=new GDCWidget('wg1','bankGopayPwdCtrlDiv','dtLi',function(pwdPanelId){
//        bankGopayPwdCtrl=new PwdControl("payPassword","bankGopayPwdCtrlDiv",255,38);
        pgeditor.pgInitialize();
        //设置license
//        $("#lci").html(pgeditor.setLicense());
    });
    GopayDtCert.draw(w1);

    $(function() {
    	  
        $("#confirmSubmit").click(function(){
            $('#snd').val(GopayDtCert.sign());
            if(!microdoneTip("expressGopayPwdCtrlTip")) return false;
            $("#confirmForm").submit();
            <%--$.get("${ctx}/getPayPwdUUID.shtml",{ts:new Date().getTime(),count:1,safe:1},function(r){--%>
                <%--if(r&&r.code1){--%>
                    <%--bankGopayPwdCtrl.encrypt(r.code1,1);--%>
                    <%--$("#confirmForm").submit();--%>
                <%--}else{--%>
                    <%--$.alert("获取支付密码随机码失败");--%>
                <%--}--%>
            <%--},"json");--%>
        });
    });
    
</script>